{% load filters %} 
<div class="headings alt">
                <h2>基本信息</h2>
            </div>
            <div class="contentbox">
            	
            	  <div style="width:100%;float:left">
					<p style="float:left;width:350px">
                        <label for="textfield"><strong>标题</strong></label>
                        <input id="Title" maxlength="20" value="{{Model.info.Title}}"  name="Title" type="text" vf_NotNull alt="标题"  maxlength="100" class="inputbox"> 
						 	<br>  
							<span  vf_span="Title"  class="smltxt red"></span>
						<br>
                    </p>
                   
					<p style="float:left;">
                        <label  for="textfield"><strong>所属分类</strong></label>
                        <input type="text" value="{{Model.info.ArticleTypeid.Title}}"  name="ArticleTypename" class="inputbox"  readonly id="ArticleTypename"  dataType="DialogAjax" dataval="/AdminMain/ArticleType/Tree/" alt="选择分类" >
			  			<input type="hidden" value="{{Model.info.ArticleTypeid.ArticleTypeid}}"   id="ArticleType" name="ArticleType"  vf_NotNull alt="所属栏目"  >
							<br><span  vf_span="ArticleType"  class="smltxt red"></span>
						<br>
                    </p>
				</div>
				
				 <div style="float:left">
					<p style="float:left;width:350px">
                        <label for="textfield"><strong>关键字</strong></label>
                        	<input type="text" name="KeyWords" value="{{Model.info.KeyWords}}" id="KeyWords" maxlength="100" class="inputbox">
						<br>
                    </p>
					
					<p style="float:left;">
                        <label for="textfield"><strong>推荐度 
						
						
						
						{{Model.info.Recommend|tostr}}</strong></label>
                            <select name="Recommend">
                          
                            		{% for i in "0123456789" %}
									  	<option  
									{% ifequal i Model.info.Recommend|tostr %}   
                    	selected
                    	{% endifequal  %}
									
                            	>{{i}}</option>
								{% endfor %}
                            </select>
							
						<br>
                    </p>
					
					<p style="float:left;">
                        <label for="textfield"><strong>置顶级别</strong></label>
						 <select name="TopNum">
                            	{% for i in "0123456789" %}
								<option
								{% ifequal  i Model.info.TopNum|tostr %}   
                    	selected
                    	{% endifequal  %}
								
                            		>{{i}}</option>
								{% endfor %}
                            </select>
						<br>
                    </p>
					<p style="float:left;">
                        <label for="textfield"><strong>关闭时间</strong></label>
                           <input style="width:120px;"  type="text" value='{{Model.info.OverTime|date:"Y-m-d"}}'  id="OverdateTime" name="OverdateTime"  onFocus="WdatePicker()" class="inputbox"  >
						     <br>  
							      到时间将不能访问。可为空
						<br>
                    </p>
					
				</div>
					
				<div style="width:100%;float:left">
					<p style="float:left;">
                        <label for="textfield"><strong>摘要</strong></label>
						
						<textarea class="inputbox" alt="摘要"  id="Summary" name="Summary" v_maxlength="500"  rows="5" cols="150" style="margin-left: 0px; margin-right: 0px; width: 651px; " >{{Model.info.Summary}}</textarea>
						<br>
						<span  vf_span="Summary"  class="smltxt red"></span>
						<br>
                    </p>
				</div>
				
				<div style="width:100%;float:left">
					<p style="float:left;">
                        <label for="textfield"><strong>封面图片</strong></label>
						
						<input class="ke-input-text" type="hidden" id="FileId" name="FileId" value="{{Model.info.FileId}}"  /> <input type="button" id="uploadButton" value="上传" />
						<br>
						
						<img id="FileIdImg"  
						
						{% ifnotequal Model.info.FileId ""%} 
						
						{% ifnotequal Model.info.FileId null %} 
						width="200px" height="200px" src="/AdminMain/SysFile/Show/?Id={{Model.info.FileId}}"
							{% endifnotequal  %}
						{% endifnotequal  %}
						
						> </img>
						<br>
                    </p>
				</div>
				
				
				<div style="float:left">
					<p style="float:left;">
                        <label for="textfield">
                            <input type="checkbox" id="IsComment" name="IsComment" 
							
							{% ifequal  Model.info.IsComment null %}   
                    				checked
                    			{% endifequal  %}
							
							{% ifequal  Model.info.IsComment 1%}   
                    				checked
                    			{% endifequal  %}
							
							 ><strong>开启评论</strong></label>
						
                    </p>
					
					<p style="float:left;">
					
					  <label for="textfield">
                            <input type="checkbox" id="IsLogin" name="IsLogin"
							
								{% ifequal  Model.info.IsLogin 1%}   
                    				checked
                    			{% endifequal  %}
							><strong>必须登录</strong></label>
					
                    </p>
				</div>
               </div>
<script>

function OnTree(val,name)
					{
						$("#ArticleType").val(val);
						$("#ArticleTypename").val(name);
					}


	KindEditor.ready(function(K) {
				var uploadbutton = K.uploadbutton({
					button : K('#uploadButton')[0],
					fieldName : 'imgFile',
					url : '/AdminMain/SysFile/UpFile/?ModelId={{Model.info.ContentId}}',
					afterUpload : function(data) {
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							K('#FileId').val(data.id);
							$('#FileIdImg').attr("src",url);
							$('#FileIdImg').attr("width",300);
							$('#FileIdImg').attr("height",200);
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton.fileBox.change(function(e) {
					uploadbutton.submit();
				});

			});
</script>			   
			   
			   
